// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import 'default-passive-events'
import router from './router'
import store from './store'
import './assets/css/reset.scss'// 重置HTML样式
import './assets/css/base.scss' // 全局样式
import './assets/css/el-ui.scss' // 优化element样式
import './assets/css/dark.scss'  // 导入暗黑主题
import '@/components/index'  //注册全局组件
let echarts = require('echarts')
import dataV from '@jiaminghi/data-view'
import http from './utils/request'
Vue.config.productionTip = false
Vue.prototype.$ELEMENT = { size: 'small', zIndex: 3000 };

// 去除Chrome警告
import 'default-passive-events'

// Vue.config.productionTip = false
// 滚动插件
import vuescroll from 'vuescroll'      // 滚动插件
Vue.use(vuescroll)
Vue.use(dataV)

new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  // 这个地方后面应该要用 render 优化
  // template: '<App/>'
  render: h => h(App),
  mounted () {
    // 触发renderAfterDocumentEvent
    document.dispatchEvent(new Event('render-event'))
  } 
})
Vue.prototype.$echarts = echarts
Vue.prototype.$http = http